//
//  UIButton+Extension.swift
//  727-黑马08微博-测试
//
//  Created by apple on 15/8/3.
//  Copyright © 2015年 itheima. All rights reserved.
//

import UIKit

extension UIButton {

    convenience init(title: String, imageName: String, fontSize: CGFloat = 12, color: UIColor = UIColor.darkGrayColor()) {
        self.init()
        setTitle(title, forState: UIControlState.Normal)
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitleColor(color, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }
}
